import json

# 定义一个字典
data = {
    "name": "张三",
    "age": 30,
    "city": "北京"
}
print("hi")
# # 将字典保存为JSON文件
# with open("./data.json", "w", encoding="utf-8") as f:
#     json.dump(data, f, ensure_ascii=False, indent=4)

# 打开文件并读取数据
with open('./data.json', 'r', encoding='utf-8') as file:
    dataInfo = json.load(file)

# 现在data是一个字典
print(dataInfo)
